package o;

import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import o.dog.e;

public class don {
    private static dog ˋ;
    private static e ˏ = e.MODE_SUPPORT_UNKNOWN;

    public static dog ˋ() {
        ॱ();
        if (ˏ == e.MODE_SUPPORT_MTK_GEMINI) {
            ˋ = dol.ˎ();
        } else {
            ˋ = dop.ˊ();
        }
        return ˋ;
    }

    public static boolean ॱ() {
        if (ˏ != e.MODE_SUPPORT_UNKNOWN) {
            if (ˏ == e.MODE_SUPPORT_HW_GEMINI || ˏ == e.MODE_SUPPORT_MTK_GEMINI) {
                return true;
            }
            return false;
        } else if (ˎ()) {
            ˏ = e.MODE_SUPPORT_MTK_GEMINI;
            return true;
        } else if (ˏ()) {
            ˏ = e.MODE_SUPPORT_HW_GEMINI;
            return true;
        } else {
            ˏ = e.MODE_NOT_SUPPORT_GEMINI;
            return false;
        }
    }

    private static boolean ˏ() {
        boolean booleanValue;
        NoSuchMethodException e;
        IllegalAccessException e2;
        InvocationTargetException e3;
        try {
            Object ˋ = dop.ˋ();
            if (ˋ == null) {
                return false;
            }
            booleanValue = ((Boolean) ˋ.getClass().getMethod("isMultiSimEnabled", new Class[0]).invoke(ˋ, new Object[0])).booleanValue();
            try {
                Logger.ˎ("MultiCardFactory", "isHwGeminiSupport1 " + booleanValue);
                return booleanValue;
            } catch (NoSuchMethodException e4) {
                e = e4;
            } catch (IllegalAccessException e5) {
                e2 = e5;
                Logger.e("MultiCardFactory", "isHwGeminiSupport isMultiSimEnabled():" + e2.toString());
                return booleanValue;
            } catch (InvocationTargetException e6) {
                e3 = e6;
                Logger.e("MultiCardFactory", "isHwGeminiSupport isMultiSimEnabled():" + e3.toString());
                return booleanValue;
            }
        } catch (NoSuchMethodException e7) {
            NoSuchMethodException noSuchMethodException = e7;
            booleanValue = false;
            e = noSuchMethodException;
            Logger.e("MultiCardFactory", "isHwGeminiSupport isMultiSimEnabled():" + e.toString());
            return booleanValue;
        } catch (IllegalAccessException e8) {
            IllegalAccessException illegalAccessException = e8;
            booleanValue = false;
            e2 = illegalAccessException;
            Logger.e("MultiCardFactory", "isHwGeminiSupport isMultiSimEnabled():" + e2.toString());
            return booleanValue;
        } catch (InvocationTargetException e9) {
            InvocationTargetException invocationTargetException = e9;
            booleanValue = false;
            e3 = invocationTargetException;
            Logger.e("MultiCardFactory", "isHwGeminiSupport isMultiSimEnabled():" + e3.toString());
            return booleanValue;
        }
    }

    private static boolean ˎ() {
        boolean z;
        ClassNotFoundException e;
        NoSuchFieldException e2;
        IllegalAccessException e3;
        try {
            Field declaredField = Class.forName("com.mediatek.common.featureoption.FeatureOption").getDeclaredField("MTK_GEMINI_SUPPORT");
            declaredField.setAccessible(true);
            z = declaredField.getBoolean(null);
            try {
                Logger.ˎ("MultiCardFactory", "isMtkGeminiSupport " + z);
            } catch (ClassNotFoundException e4) {
                e = e4;
                Logger.ˋ("MultiCardFactory", "isMtkGeminiSupport FeatureOption.MTK_GEMINI_SUPPORT:" + e.toString());
                return z;
            } catch (NoSuchFieldException e5) {
                e2 = e5;
                Logger.ˋ("MultiCardFactory", "isMtkGeminiSupport FeatureOption.MTK_GEMINI_SUPPORT:" + e2.toString());
                return z;
            } catch (IllegalAccessException e6) {
                e3 = e6;
                Logger.ˋ("MultiCardFactory", "isMtkGeminiSupport FeatureOption.MTK_GEMINI_SUPPORT:" + e3.toString());
                return z;
            }
        } catch (ClassNotFoundException e7) {
            ClassNotFoundException classNotFoundException = e7;
            z = false;
            e = classNotFoundException;
            Logger.ˋ("MultiCardFactory", "isMtkGeminiSupport FeatureOption.MTK_GEMINI_SUPPORT:" + e.toString());
            return z;
        } catch (NoSuchFieldException e8) {
            NoSuchFieldException noSuchFieldException = e8;
            z = false;
            e2 = noSuchFieldException;
            Logger.ˋ("MultiCardFactory", "isMtkGeminiSupport FeatureOption.MTK_GEMINI_SUPPORT:" + e2.toString());
            return z;
        } catch (IllegalAccessException e9) {
            IllegalAccessException illegalAccessException = e9;
            z = false;
            e3 = illegalAccessException;
            Logger.ˋ("MultiCardFactory", "isMtkGeminiSupport FeatureOption.MTK_GEMINI_SUPPORT:" + e3.toString());
            return z;
        }
        return z;
    }
}
